function mymat = insertRow(mat, col)
    [m n] = size(mat);
    [mc nc] = size(col);
    if (n < nc)
        mat = [mat zeros(m, nc - n)];
    elseif (n > nc)
        col = [col zeros(mc, n- nc)];
    end
    mymat = [mat;col];
end